<template>
  <div :class="{test:color}" v-on:click="click">
    test
  </div>
</template>

<script>
import {init} from "../util/storage"
export default {
  name: "test",
  data(){
    return {
      color:false,
    }
  },
  methods:{
    click(){
      this.color= !this.color
      init.saveItem("color",this.color)
    }
  },
  mounted() {
    this.color = init.loadItem("color",null)
  }
}
</script>

<style scoped>
.test {
  color: #42b983;
}
</style>